package com.zfl.practice;

import java.util.concurrent.atomic.LongAccumulator;

public class LongAccumulateDemo01 {
    public static void main(String[] args) {
        LongAccumulator longAccumulator = new LongAccumulator((left, right) -> left * right, 10);
        System.out.println("longAccumulator.longValue() = " + longAccumulator.longValue());
        longAccumulator.accumulate(2);
        System.out.println("longAccumulator.get() = " + longAccumulator.get());
    }
}
